# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-pick
_pkgname=pick
pkgver=2.4.0
pkgrel=3
pkgdesc='Create curses based interactive selection list in the terminal.'
arch=('any')
url='https://pypi.org/project/pick/#files'
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-pip')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('23524a344bc5a87399082bd18f15c1d0ac53ad5dd283547d36edd25e4870bdfcd8d3ed9ed7199b1883120ba8db5cb11dac6a433592d77d4f36aab9ad12b340b1')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

